#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
int main() {
	int n;
	scanf("%d", &n);
	int a[n], odd = 0, even = 0;
	for (int i = 0; i < n; i++)
	{
		scanf("%d", &a[i]);
	}
	for (int i = 0; i < n; i++)
	{
		if (a[i] % 2 == 0)
		{
			even++;
		}
		else {
			odd++;
		}
	}

	printf("%d %d", odd, even);



	return 0;
}

